package sctu.edu.java.year2016.team02.wanggaowen.day20160521.chapter5_2;

/**
 * Created by 15c on 2016/5/24.
 */import java.util.Arrays;
public class Work5_2 {
    public static void main(String[] args) {
        int c = 0;
        int arr[] = new int[]{12, 3, 4, 5, 67, 65, 4, 34, 2};
        System.out.print("\n排序前数组：");
        for (int a : arr) {
            System.out.print(a + "  ");
        }
        Arrays.sort(arr);
        System.out.print("\n排序后数组：");
        for (int b : arr) {
            System.out.print(b + "  ");
            if (c < b) c = b;
        }
        System.out.print("\n最大值：" + c);
    }
}
